<?xml version='1.0' encoding='UTF-8' ?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                template="/WEB-INF/facelets/template.xhtml">

    <ui:param name="title" value="Categories" />
    <ui:define name="scripts">
	<script type="text/javascript" src="res/jquery-1.6.4.js"></script>
	<script type="text/javascript" src="res/confirmButton.js"></script>
    </ui:define>
    <ui:define name="content">
        <h1>Categories</h1>
        <div>
            <div class="myCategories">
		<c:choose>
		    <c:when test="#{CategoryBean.areAnyPrivateCategories()}">
			<ui:include src="WEB-INF/facelets/categoryTable.xhtml" />
		    </c:when>
		    <c:otherwise>
			No private categories yet. <a href="manage">Create one</a>.
		    </c:otherwise>
		</c:choose>
            </div>

	    <c:if test="#{CategoryBean.areAnyPublicCategories()}">
		<div class="publicCategories">
		    <ui:include src="WEB-INF/facelets/categoryPublicTable.xhtml" />
		</div>
	    </c:if>
        </div>
    </ui:define>

</ui:composition>

